﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace Sodu.SoduConstants
{
    public class SoduContantsValue
    {
        /// <summary>
        /// Cookie
        /// </summary>
        private static CookieContainer _SoduGlobleCookie;

        public static CookieContainer SoduGlobleCookie
        {
            get
            {
                if (_SoduGlobleCookie == null) _SoduGlobleCookie = new CookieContainer();
                return _SoduGlobleCookie;
            }
            internal set
            {
                _SoduGlobleCookie = value;
            }
        }

        /// <summary>
        /// 是否登录
        /// </summary>
        public static bool Loaded = true;


        /// <summary>
        /// 用户名
        /// </summary>
        public static string UserName = "";

        /// <summary>
        /// 用户是否登录
        /// </summary>
        public static bool IfLogin = false;

        /// <summary>
        /// <summary>
        /// 首页地址
        /// </summary>
        public const string HomePage = "http://www.soduso.com";

        /// <summary>
        /// 登录页
        /// </summary>
        public const string LoginPostPage = "http://www.soduso.com/checklogin.ashx";

        /// <summary>
        /// 注销页面
        /// </summary>
        public const string LogoutPage = " http://www.soduso.com/logout.ashx";

        /// <summary>
        /// 我的书架
        /// </summary>
        public const string BookShelfPage = "http://www.soduso.com/myshujia.aspx";

        /// <summary>
        /// 搜索地址
        /// </summary>
        public const string BookSearchPage = "http://www.soduso.com/search/index.aspx?key={0}&page={1}";


        /// <summary>
        /// 排行榜地址
        /// </summary>
        public const string BookRankListPage = "http://www.soduso.com/top_{0}.html";
    }
    //public class UserInfo : INotifyPropertyChanged
    //{
    //    public event PropertyChangedEventHandler PropertyChanged;

    //    private string name;
    //    public string Name
    //    {

    //        get
    //        {
    //            return name;
    //        }
    //        set
    //        {
    //            name = value;
    //            if (PropertyChanged != null)
    //            {   //如果Name属性发生了改变，则触发这个事件
    //                this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Name"));
    //            }
    //        }
    //    }


    //    private bool loaded;
    //    public bool Loaded
    //    {
    //        get
    //        {
    //            return loaded;
    //        }
    //        set
    //        {
    //            loaded = value;
    //        }

    //    }
    //}
}
